import HttpClient from "@/utils/request.js";
import { FindAgreement, HelpCenterItem, NoticeList } from "@/interfaces/sysconf.js";

const http = new HttpClient({
    baseURL: 'https://new.uhx.io/sysconf', // 代理地址
    timeout: 50000,
});

export const findAgreement = (params: { type: 'privacy' | 'user' }): Promise<FindAgreement> => {
    return http.get<FindAgreement>('/agreement/findAgreement', { params });
}

export const selectHelpCenterForPc = (): Promise<HelpCenterItem[]> => {
    return http.post<HelpCenterItem[]>('/helpCenter/selectHelpCenterForPc', {});
}

export const list = (params: { type: string }): Promise<HelpCenterItem[]> => {
    return http.get<HelpCenterItem[]>('/news/list', { params });
}

export const systemNoticeList = (params: { pageNo: number, pageSize: number }): Promise<NoticeList> => {
    return http.get<NoticeList>('/systemNotice/systemNoticeList', { params });
}



